package com.keensense.vcm.model;

import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;

import com.keensense.vcm.model.enums.AlarmTypeEnum;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 * @author lanjian
 * @date 2020/5/27 5:56 下午
 */
@XmlRootElement(name = "response")
public class SearchAlarmResponse extends BaseResponse {

    @XmlElement
    private Integer totalCount;

    @XmlElementWrapper(name = "alarm-list")
    @XmlElement(name = "alarms")
    private List<Alarms> alarmsList;

    @XmlTransient
    public Integer getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Integer totalCount) {
        this.totalCount = totalCount;
    }


    @XmlTransient
    public List<Alarms> getAlarmsList() {
        return alarmsList;
    }

    public void setAlarmsList(List<Alarms> alarmsList) {
        this.alarmsList = alarmsList;
    }

    public static class Alarms {

        @XmlElement
        private Alarm alarm;

        @XmlElement(name = "task-info")
        private TaskInfo taskInfo;

        @XmlElement
        private String domainCode;

        @XmlTransient
        public Alarm getAlarm() {
            return alarm;
        }

        public void setAlarm(Alarm alarm) {
            this.alarm = alarm;
        }

        @XmlTransient
        public TaskInfo getTaskInfo() {
            return taskInfo;
        }

        public void setTaskInfo(TaskInfo taskInfo) {
            this.taskInfo = taskInfo;
        }

        @XmlTransient
        public String getDomainCode() {
            return domainCode;
        }

        public void setDomainCode(String domainCode) {
            this.domainCode = domainCode;
        }
    }

    public static class Alarm {
        /**
         * M string 告警id
         */
        @XmlElement(name = "alarm-id")
        private String alarmId;
        /**
         * O string 命中名单创建者, 当rule为车牌识别时返回。该字段只支持在查询本域产生的告警时返回。
         */
        @XmlElement
        private String creator;

        /**
         * O string 告警所属命中名单组id，当rule为车牌识别或人脸识别时返回
         */
        @XmlElement
        private String blackListId;

        /**
         * O string 告警所属命中名单组的名称，当rule为车牌识别或人脸识别时返回。该字段只支持在查询本域产生的告警时返回。
         */
        @XmlElement
        private String blackListIdName;

        /**
         * 1:紧急 2:严重 3:一般 4:提示
         */
        @XmlElement(name = "alarm-level")
        private Integer alarmLevel;

        /**
         * M string 告警类型
         */

        @XmlElement
        private String type;

        @XmlElementWrapper(name = "rule")
        @XmlElement(name = "type")
        private List<String> rule;

        @XmlElementWrapper(name = "suspectIdList")
        @XmlElement(name = "id")
        private List<String> suspectIdList;

        @XmlElement(name = "alarm-time")
        private Long alarmTime;

        @XmlElement
        private String thumPicUrl;

        @XmlElement
        private String picUrl;

        @XmlElement
        private String url;

        @XmlElement
        private String suspectPictureId;

        @XmlElement
        private String quality;

        @XmlElement
        private AlarmTypeEnum alarmListType;

        @XmlElement
        private String algorithmCode;

        @XmlElement
        private Integer hitType;

        @XmlElement
        private String pictureId;

        @XmlElement
        private String thirdUrl;

        @XmlElement(name = "third_field")
        private String thirdField;

        @XmlElement
        private String extensionField;

        @XmlElement
        private String relationId;

        @XmlElement
        private String relationType;

        @XmlElement
        private String isDomainTask;

        @XmlElement
        private Integer source;

        @XmlTransient
        public String getAlarmId() {
            return alarmId;
        }

        public void setAlarmId(String alarmId) {
            this.alarmId = alarmId;
        }

        @XmlTransient
        public String getCreator() {
            return creator;
        }

        public void setCreator(String creator) {
            this.creator = creator;
        }

        @XmlTransient
        public String getBlackListId() {
            return blackListId;
        }

        public void setBlackListId(String blackListId) {
            this.blackListId = blackListId;
        }

        @XmlTransient
        public String getBlackListIdName() {
            return blackListIdName;
        }

        public void setBlackListIdName(String blackListIdName) {
            this.blackListIdName = blackListIdName;
        }

        @XmlTransient
        public Integer getAlarmLevel() {
            return alarmLevel;
        }

        public void setAlarmLevel(Integer alarmLevel) {
            this.alarmLevel = alarmLevel;
        }

        @XmlTransient
        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        @XmlTransient
        public List<String> getRule() {
            return rule;
        }

        public void setRule(List<String> rule) {
            this.rule = rule;
        }

        @XmlTransient
        public List<String> getSuspectIdList() {
            return suspectIdList;
        }

        public void setSuspectIdList(List<String> suspectIdList) {
            this.suspectIdList = suspectIdList;
        }

        @XmlTransient
        public Long getAlarmTime() {
            return alarmTime;
        }

        public void setAlarmTime(Long alarmTime) {
            this.alarmTime = alarmTime;
        }

        @XmlTransient
        public String getThumPicUrl() {
            return thumPicUrl;
        }

        public void setThumPicUrl(String thumPicUrl) {
            this.thumPicUrl = thumPicUrl;
        }

        @XmlTransient
        public String getPicUrl() {
            return picUrl;
        }

        public void setPicUrl(String picUrl) {
            this.picUrl = picUrl;
        }

        @XmlTransient
        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        @XmlTransient
        public String getSuspectPictureId() {
            return suspectPictureId;
        }

        public void setSuspectPictureId(String suspectPictureId) {
            this.suspectPictureId = suspectPictureId;
        }

        @XmlTransient
        public String getQuality() {
            return quality;
        }

        public void setQuality(String quality) {
            this.quality = quality;
        }

        @XmlTransient
        public AlarmTypeEnum getAlarmListType() {
            return alarmListType;
        }

        public void setAlarmListType(AlarmTypeEnum alarmListType) {
            this.alarmListType = alarmListType;
        }

        @XmlTransient
        public String getAlgorithmCode() {
            return algorithmCode;
        }

        public void setAlgorithmCode(String algorithmCode) {
            this.algorithmCode = algorithmCode;
        }

        @XmlTransient
        public Integer getHitType() {
            return hitType;
        }

        public void setHitType(Integer hitType) {
            this.hitType = hitType;
        }

        @XmlTransient
        public String getPictureId() {
            return pictureId;
        }

        public void setPictureId(String pictureId) {
            this.pictureId = pictureId;
        }

        @XmlTransient
        public String getThirdUrl() {
            return thirdUrl;
        }

        public void setThirdUrl(String thirdUrl) {
            this.thirdUrl = thirdUrl;
        }

        @XmlTransient
        public String getThirdField() {
            return thirdField;
        }

        public void setThirdField(String thirdField) {
            this.thirdField = thirdField;
        }

        @XmlTransient
        public String getExtensionField() {
            return extensionField;
        }

        public void setExtensionField(String extensionField) {
            this.extensionField = extensionField;
        }

        @XmlTransient
        public String getRelationId() {
            return relationId;
        }

        public void setRelationId(String relationId) {
            this.relationId = relationId;
        }

        @XmlTransient
        public String getRelationType() {
            return relationType;
        }

        public void setRelationType(String relationType) {
            this.relationType = relationType;
        }

        @XmlTransient
        public String getIsDomainTask() {
            return isDomainTask;
        }

        public void setIsDomainTask(String isDomainTask) {
            this.isDomainTask = isDomainTask;
        }

        @XmlTransient
        public Integer getSource() {
            return source;
        }

        public void setSource(Integer source) {
            this.source = source;
        }
    }

    public static class TaskInfo {
        @XmlElement(name = "camera-id")
        private String cameraId;

        @XmlElement(name = "camera-address")
        private String cameraAddress;

        @XmlElement(name = "cameraCNCode")
        private String cameraCNCode;

        @XmlElement(name = "camera-name")
        private String cameraName;

        @XmlElement(name = "case-file-id")
        private String caseFileId;

        @XmlElement
        private String resolution;

        @XmlElement(name = "task-id")
        private String taskId;

        @XmlElement
        private String longitude;

        @XmlElement
        private String latitude;

        @XmlTransient
        public String getCameraId() {
            return cameraId;
        }

        public void setCameraId(String cameraId) {
            this.cameraId = cameraId;
        }

        @XmlTransient
        public String getCameraAddress() {
            return cameraAddress;
        }

        public void setCameraAddress(String cameraAddress) {
            this.cameraAddress = cameraAddress;
        }

        @XmlTransient
        public String getCameraCNCode() {
            return cameraCNCode;
        }

        public void setCameraCNCode(String cameraCNCode) {
            this.cameraCNCode = cameraCNCode;
        }

        @XmlTransient
        public String getCameraName() {
            return cameraName;
        }

        public void setCameraName(String cameraName) {
            this.cameraName = cameraName;
        }

        @XmlTransient
        public String getCaseFileId() {
            return caseFileId;
        }

        public void setCaseFileId(String caseFileId) {
            this.caseFileId = caseFileId;
        }

        @XmlTransient
        public String getResolution() {
            return resolution;
        }

        public void setResolution(String resolution) {
            this.resolution = resolution;
        }

        @XmlTransient
        public String getTaskId() {
            return taskId;
        }

        public void setTaskId(String taskId) {
            this.taskId = taskId;
        }

        @XmlTransient
        public String getLongitude() {
            return longitude;
        }

        public void setLongitude(String longitude) {
            this.longitude = longitude;
        }

        @XmlTransient
        public String getLatitude() {
            return latitude;
        }

        public void setLatitude(String latitude) {
            this.latitude = latitude;
        }
    }
}
